import java.io.PrintStream;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

import static java.lang.System.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] input = scanner.nextLine().split(" ");
        String startTimeStr = input[0];
        String endTimeStr = input[1];


        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmm");


        LocalTime startTime = LocalTime.parse(startTimeStr, formatter);
        LocalTime endTime = LocalTime.parse(endTimeStr, formatter);


        long totalMinutes = java.time.Duration.between(startTime, endTime).toMinutes();


        long hours = totalMinutes / 60;
        long minutes = totalMinutes % 60;


        System.out.printf("%02d:%02d", hours, minutes);
    }
}
